package com.sx.zongzhi.presenter;

import com.sx.zongzhi.MyApplication;
import com.sx.zongzhi.bean.CompanyAppealBean;
import com.sx.zongzhi.modle.ApiManager;
import com.sx.zongzhi.net.BaseCallBack;
import com.sx.zongzhi.net.BaseResult;
import com.sx.zongzhi.view.ICompanyAppealListView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by XZY on 2017/11/30.
 * 诉求服务获取主办/抄办单位的列表
 */
public class CompanyAppealListPest {

    private ICompanyAppealListView listView;

    public CompanyAppealListPest(ICompanyAppealListView listView) {
        this.listView=listView;
    }


    public void getCompanyAppealList(String exceptIds){
        Map<String,Object> map=new HashMap<>();
        map.put("sid", MyApplication.sid);
        map.put("exceptIds", exceptIds);
        new ApiManager().getCompanyAppealList(map, new BaseCallBack<BaseResult<List<CompanyAppealBean.RowsBean>>>() {
            @Override
            public void onSuccess(BaseResult<List<CompanyAppealBean.RowsBean>> response) {
                listView.getCompanyList(response.getData());
            }
            @Override
            public void onFailures(String message) {
                listView.showError(message);
            }
        });
    }


}
